#include <cstdio>
#include <algorithm>
typedef long long ll;
using namespace std;
ll n;
bool check(ll k){
    //printf("%lld\n",k);
    ll x=n;
    //Vasya to eat
    ll cnt=0;
    while(x>0){
        //printf("%lld\n",x);
        cnt+=min(x,k);
        x-=min(x,k);
        x-=x/10;
        
    }
    //printf("%lld\n",cnt);
    return cnt>=(n+1)/2;
}
int main(void){
    scanf("%lld",&n);
    ll l=1;
    ll r=n;
    ll m;
    ll ans=n;
    while(l<=r){
        m=(l+r)/2;
        if(check(m)){
            r=m-1;
            ans=min(ans,m);
        }
        else{
            l=m+1;
        }
    }
    //check(34);
    printf("%lld\n",ans);
    return 0;
}